using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using TerritoryGame.Domain.Entities.App;

namespace TerritoryGame.Application.Interfaces
{
    public interface IAppGameHistoryService
    {
        Task<List<GameRecord>> GetPlayerHistoryAsync(string playerId, int page = 1, int pageSize = 20);
        Task<List<GameRecord>> GetRoomHistoryAsync(string roomId, int page = 1, int pageSize = 20);
        Task<List<GameRecord>> GetGlobalHistoryAsync(int page = 1, int pageSize = 20);
        Task<GameRecord?> GetGameRecordAsync(string gameId);
        Task<bool> SaveGameRecordAsync(GameRecord record);
        Task<bool> DeleteGameRecordAsync(string gameId);
        Task<List<GameRecord>> GetHistoryByDateRangeAsync(DateTime startDate, DateTime endDate, int page = 1, int pageSize = 20);
        Task<int> GetTotalGameCountAsync();
        Task<int> GetPlayerGameCountAsync(string playerId);
        
        // 记录游戏结果
        Task<bool> RecordGameResultAsync(string roomId, object leaderboard);
    }
}
